import request from '@/utils/request'

// 查询页面可配置权限
export function getPageButtonPermission(data) {
  return request({
    url: '/api/auth/auth/apermission/APermissionRest/searchStrict/v1',
    method: 'post',
    data
  })
}

// 添加页面可配置权限
export function addPageButtonPermission(data) {
  return request({
    url: '/api/auth/auth/apermission/APermissionRest/saveUnique/v1',
    method: 'post',
    data
  })
}

// 批量删除页面可配置权限
export function deletePageButtonPermission(data) {
  return request({
    url: '/api/auth/auth/apermission/APermissionRest/deleteByIdList/v1',
    method: 'post',
    data
  })
}

// 编辑页面权限
export function editPageButtonPermission(data) {
  return request({
    url: '/api/auth/auth/apermission/APermissionRest/updatePermission/v1',
    method: 'post',
    data
  })
}

// 查询角色在某一页面下的权限
export function getRolePageButtonPermission(data) {
  return request({
    url: '/api/auth/auth/arolepermission/ARolePermissionRest/searchByPageCode/v1',
    method: 'post',
    data
  })
}

// 批量更新角色在某一页面下的权限
export function editRolePageButtonPermission(data) {
  return request({
    // url: '/api/auth/auth/arolepermission/ARolePermissionRest/updateByPage/v1',
    url: '/api/auth/auth/arolepermission/ARolePermissionRest/updateListByPage/v1',
    method: 'post',
    data
  })
}
